import request from "@/utils/request"

export function tree(query) {
  return request({
    url: "/basic/hisDeptDic/tree",
    method: "get",
    params: query
  })
}

export function LazyTree(query) {
  return request({
    url: "/basic/hisDeptDic/LazyTree",
    method: "get",
    params: query
  })
}

export function deptDicLazyTree(id) {
  return request({
    url: `/basic/hisDeptDic/LazyNodeTree/${id}`,
    method: "get"
  })
}

export function list() {
  return request({
    url: "/basic/hisDeptDic/list",
    method: "get"
  })
}

export function editDeptDic(data) {
  return request({
    url: "/basic/hisDeptDic",
    method: "put",
    data: data
  })
}

export function addDeptDic(data) {
  return request({
    url: "/basic/hisDeptDic",
    method: "post",
    data: data
  })
}

export function getById(id) {
  return request({
    url: "/basic/hisDeptDic/" + id,
    method: "get"
  })
}

export function Delete(id) {
  return request({
    url: "/basic/hisDeptDic",
    method: "delete",
    params: { id }
  })
}

export function medicalStaffList(query) {
  //查询医护人员信息
  return request({
    url: "/basic/hisMedicalStaff/list",
    method: "get",
    params: query
  })
}

export function getDicTypeByCodes(obj) {
  return request({
    url: `/basic/hisDicType/getDicTypeByCodes`,
    method: "post",
    data: obj
  })
}
